package com.ytjj.qmyx.admin.controller;

import com.ytjj.common.api.CommonPage;
import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.model.PlatformStrictInfo;
import com.ytjj.qmyx.admin.model.request.PlatformStrictInfoRequest;
import com.ytjj.qmyx.admin.service.PlatformStrictInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 虚拟达人-我的权益
 */
@RestController
@RequestMapping("/strict")
public class PlatformStrictInfoController {
    @Autowired
    private PlatformStrictInfoService platformStrictInfoService;

    @PostMapping("/list")
    public CommonResult list(@RequestBody PlatformStrictInfoRequest request) {
        return CommonResult.success(platformStrictInfoService.query(request));
    }

    @PostMapping("/save")
    public CommonResult save(@RequestBody PlatformStrictInfo request) {
        return platformStrictInfoService.save(request);
    }

    @GetMapping("/detail")
    public CommonResult detail(@RequestParam Integer id) {
        return CommonResult.success(platformStrictInfoService.detail(id));
    }
}
